/**
 * ProjectName:  mall-service
 * FileName:  MessageServiceImpl.java
 * PackageName:  com.blx.service.impl
 * Copyright (c) 2013, CYOU All Rights Reserved.
*/
package com.blx.service.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.blx.dao.MessageDao;
import com.blx.entity.Message;
import com.blx.service.MessageService;
import com.blx.utils.pagination.Pagination;

/**
 * ClassName:  MessageImpl. <br/>
 * Description: MessageService接口实现 <br/>
 * @author wangwl
 * 2013-3-4 下午9:02:20 <br/>
 * @version 1.0
 */
@Service
public class MessageServiceImpl implements MessageService {

	private final Logger logger = LoggerFactory.getLogger(getClass());

	@Autowired
	private MessageDao messageDao;

	/**
	 * 保存Message实体
	 */
	public void saveMessage(Message message) {
		messageDao.saveMessage(message);
	}
	/**
	 * 更新Message实体
	 */
	public void updateMessage(Message message) {
		messageDao.updateMessage(message);
	}
	/**
	 * 根据id删除Message
	 */
	public void deleteMessageById(Integer messageId) {
		messageDao.deleteMessageById(messageId);
	}
	/**
	 * 根据id获取Message
	 */
	public Message getMessage(Integer messageId) {
		return messageDao.getMessageById(messageId);
	}
	/**
	 * 分页查询Message
	 */
	public Pagination<Message> findPageMessageAll(int pageNumber, int pageSize) {
		return messageDao.findPageMessageAll(pageNumber, pageSize);
	}

}

